<?
	//error_reporting(E_ALL);
	//require_once "../../commons/includes/authentication.inc"; 		
	
	$dbName = $_REQUEST["Db"];
	$table = $_REQUEST["vc__LogTable"];
	$id = $_REQUEST["in__LogTableID"];
	
	if("$dbName"=="" || "$table"==""  || "$id"=="" ) {
		echo "
			<script>
				window.close();
			</script>			
		";
		exit();
	}
	
	require_once "../../commons/includes/stringutils.inc"; 	
	require_once "../../commons/includes/connection.inc"; 
	
	$sql = "SELECT * FROM LogTable ";
	$rs = rs($sql, $_REQUEST,$dbName);
	
	$windowTitle="History";
	include "../../commons/templates/layout_o.inc";

?>

<div class="edit">
		
	<h1>
		<span>History</span>
		<input type="button" value="Close" class="barbutton" onclick="window.close();window.close();">						
	</h1>
	
	<!-- h2>Name</h2 -->
	<br>
	
		
		<table class="basic" style="width:98%;border:0">
			<tr><th>User<th>Date<th>Action
		<?
			
			while ($values = $rs->getRow()) {
			
				foreach($values as $key=>$val) $$key = $val;					
				$LogDate = StringUtils::stringToDateTimeString($LogDate);
				
				echo "<tr><td>$LogUser<td>$LogDate <td>$LogAction";
			}	
			
			@$rs->freeResult();
		?>
		</table>
	
	
</div>			
	
	
<? include "../../commons/templates/layout_c.inc"; ?>